package com.kaibes.module.permission.pojo;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

import com.kaibes.core.base.annotation.Description;
import com.kaibes.core.base.builder.JsonBuilder;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Description("角色权限配对")
public class PowerPost {
    
    @Description("权限名称，类名_方法名")
    @NotBlank
    private String name;
    @Description("角色ID")
    @Min(value = 1, message = "id不能小于1")
    private Integer roleId;
    
    @Override
    public String toString() {
        return JsonBuilder.newBuilderIgnoreNull(this).build();
    }
}
